#include <sstream> 
#include <iostream>
#include <string>

int main()
{
	long long a;
	std::cin >> a;
	int isNeg = 0;
	
	if ( a == 0 ) {
		std::cout << 0;
		return 0;
	}
	
	if ( a < 0 ) {
		isNeg = 1;
		a = a * -1;
	}
	
	std::stringstream ss;
	ss << a;
	
	std::string str = ss.str();
	long long beginIdx = str.size() - 1;
	for ( ; beginIdx >= 0; beginIdx -- ) {
		if ( str[beginIdx] != '0' ) {
			break;
		}
	}
	
	if ( isNeg ) {
		std::cout << "-";
	}
	for ( ;  beginIdx >= 0; beginIdx -- ) {
		std::cout << str[beginIdx];
	}
	return 0;
}
